import java.util.Scanner;

/**
 * @author gao
 * @date 2025/7/5 14:40
 */

class ListNode {
    int val;
    ListNode next;

    public ListNode() {
    }

    public ListNode(int val) {
        this.val = val;
    }

    public ListNode(int val, ListNode next) {
        this.val = val;
        this.next = next;
    }
}

public class Solution {
    public void reorderList(ListNode head) {
        if (head == null || head.next == null || head.next.next == null) {
            return;
        }

        // 先找到链表的中间节点
        ListNode fast = head, slow = head;
        while (fast != null && fast.next != null) {
            fast = fast.next.next;
            slow = slow.next;
        }

        // slow后面的部分进行翻转
        ListNode head2 = new ListNode(0);
        ListNode cur = slow.next;
        slow.next = null;
        while (cur != null) {
            ListNode curN = cur.next;
            cur.next = head2.next;
            head2.next = cur;
            cur = curN;
        }

        // 合并两个链表
        ListNode cur1 = head, cur2 = head2.next;
        ListNode ret = new ListNode(0);
        ListNode prev = ret;
        while (cur1 != null) {
            prev.next = cur1;
            prev = cur1;
            cur1 = cur1.next;
            while (cur2 != null) {
                prev.next = cur2;
                prev = cur2;
                cur2 = cur2.next;
            }
        }
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = in.nextInt();
            ListNode head = null;
            ListNode tail = null;

            for (int i = 0; i < n; i++) {
                int val = in.nextInt();
                ListNode newNode = new ListNode(val);
                if (head == null) {
                    head = newNode;
                    tail = newNode;
                } else {
                    tail.next = newNode;
                    tail = newNode;
                }
            }
            Solution solution = new Solution();
            solution.reorderList(head);
            Print(head);
        }
    }

    private static void Print(ListNode head) {
        ListNode cur = head;
        while (cur != null) {
            System.out.print(cur.val + " ");
            cur = cur.next;
        }
    }
}